home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 4 / The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO / clang / cujaug93.zip / 1108036A < prev    next >
Text File  |  1993-05-05  |  2KB  |  43 lines

  1. /***************************************************************
  2.  * file: ZONE.H
  3.  * purpose: definitions, types and prototypes for zone.c
  4.  **************************************************************/
  5.  
  6. /* definitions */
  7.     /* sampling */
  8. #define SAMPLE_200_X 8      /* x sample frequency for a 
  9.                                200 dpi image */
  10. #define SAMPLE_200_Y 10     /* y sample frequency for a 
  11.                                200 dpi image */
  12. #define MAX_MALLOC 0xff00   /* maximum malloc size */
  13.  
  14.     /* vertical line cutting */
  15. #define CUT_VERTICAL_LINES 0    /* turn vertical line cutting on/off */
  16. #define VERTICAL_LINE_SIZE 16   /* minimum vertical line length @ 200 dpi */
  17.  
  18.     /* blocking */
  19. #define WHITE 0x00          /* white color in sample */
  20. #define BLACK 0xff          /* black color in sample */
  21. #define PREGNANT 0x01       /* ready to be black */
  22. #define SICK 0xfe           /* ready to be white */
  23. #define ALIVE 0x80          /* still alive */
  24. #define LIFE_SCORE 2        /* neighbors for birth */
  25. #define DEATH_SCORE 0       /* neighbors for death */
  26.  
  27.     /* sequencing */
  28. typedef struct { int x1,y1,x2,y2; } ZONE;
  29. #define MIN_X_ZONE 4        /* minimum allowable x 
  30.                                extent for a zone */
  31. #define MIN_Y_ZONE 2        /* minimum allowable y 
  32.                                extent for a zone */
  33. typedef enum { GOING_UP,GOING_RIGHT,GOING_DOWN,GOING_LEFT } HEADING;
  34. #define MAX_ZONES 99        /* maximum number of 
  35.                                zones */
  36. #define COLUMN_MAJOR 1      /* order zones with columns 
  37.                                dominate */
  38. #define ROW_MAJOR 2         /* order zones with rows 
  39.                                dominate */
  40.  
  41.     /* prototypes */
  42. int zone(int coarseness,int order);
  43.